import java.util.*;

// HJ87 密码强度等级
 public class HJ87 {

     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         while (sc.hasNext()) {
             String str = sc.nextLine();
             int len = str.length();
             int count = 0;
             if (len <= 4) {
                 count = 5;
             } else if (len >= 5 && len <= 7) {
                 count = 10;
             } else {
                 count = 25;
             }
             char[] ch = str.toCharArray();
             int small = 0;
             int big = 0;
             int num = 0;
             int sign = 0;
             for (int i = 0; i < ch.length; i++) {
                 if (Character.isDigit(ch[i])) {
                     num++;
                 } else if (Character.isLowerCase(ch[i])) {
                     small++;
                 } else if (Character.isUpperCase(ch[i])) {
                     big++;
                 } else {
                     sign++;
                 }
             }
             if (small == 0 && big == 0) {
                 count += 0;
             }  else if (small != 0 && big == 0 || small == 0 && big != 0) {
                 count += 10;
             } else {
                 count += 20;
             }

             if (num == 0) {
                 count += 0;
             } else if (num == 1) {
                 count += 10;
             } else {
                 count += 20;
             }

             if (sign == 0) {
                 count += 0;
             } else if (sign == 1) {
                 count += 10;
             } else {
                 count += 25;
             }

             if (((small + num) == ch.length && num != 0 && small != 0) ||
                     ((big + num) == ch.length && num != 0 && big != 0)) {
                 count += 2;
             } else if ((small + num + sign == ch.length && small != 0 && num != 0 &&
                     sign != 0 ) || (big + num + sign) == len && big != 0 && num != 0 && sign != 0) {
                 count += 3;
             } else if ((small + big + num + sign) == len && small != 0 && big != 0 &&
                     num != 0 && sign != 0) {
                 count += 5;
             }

             String tip = "";
             if (count >= 90) {
                 tip = "VERY_SECURE";
             } else if (count < 90 && count >= 80) {
                 tip = "SECURE";
             } else if (count < 80 && count >= 70) {
                 tip = "VERY_STRONG";
             } else if (count < 70 && count >= 60) {
                 tip = "STRONG";
             } else if (count < 60 && count >= 50) {
                 tip = "AVERAGE";
             } else if (count < 50 && count >= 25) {
                 tip = "WEAK";
             } else {
                 tip = "VERY_WEAK";
             }

             System.out.println(tip);
             System.out.println("count: " +count);
             System.out.println("len: " +len);
             System.out.println("small: " +small);
             System.out.println("big: " +big);
             System.out.println("num: " +num);
             System.out.println("sign: " +sign);
         }
     }
 }

